package com.pocket.demo.core.log;

import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * @author cookie.
 */
public class LogConstant {

    public static final String LOG_FILE_DIR = "/Users/cookie./IdeaProjects/logs";

    public static final Map<LogType, Set<String>> LOG_PACKAGES_MAP = Map.of(
            LogType.GLOBAL, Set.of("com.pocket"),
            LogType.METABASE, Set.of("com.ibatis", "com.pocket.**.dao"),
            LogType.SCHEDULE, Set.of("org.quartz")

    );

    public static final Set<String> LEVELS = Set.of("TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF");

    public static final Set<LogType> LOG_ENUM_LIST = Set.of(LogType.GLOBAL, LogType.METABASE, LogType.SCHEDULE);

    public static final Set<String> LOG_NAME_LIST = LOG_ENUM_LIST.stream().map(LogType::toString).collect(Collectors.toSet());

    public enum LogType{
        GLOBAL,
        METABASE,
        SCHEDULE,
        ;
    }
}
